#include "PhysicController.h"


	PhysicController::PhysicController(){
		physics_world = new BulletWorld();
		physics_world->set_gravity(0, 0, -9.8);
	}
	void PhysicController::CreatePointers(World* w){
		this->Pworld = w;
	}
	bool PhysicController::CreateDebug(){
		BulletDebugNode *bullet_dbg_node = new BulletDebugNode("Debug");
		bullet_dbg_node->show_bounding_boxes(false);
		bullet_dbg_node->show_constraints(false);
		bullet_dbg_node->show_normals(false);
		bullet_dbg_node->show_wireframe(true);
		 
		NodePath np_dbg_node = pWorld->window->get_render().attach_new_node(bullet_dbg_node);
		np_dbg_node.show();
		
		physics_world->set_debug_node(bullet_dbg_node);
	}
	PhysicController::~PhysicController(){
	}